package com.example.zbh.dsliao.ui.activty;


import com.example.zbh.dsliao.presenter.BasePresenter;

/**
 * Created by zbh on 15/11/16.
 */
public abstract class MVPBaseActivity<V,T extends BasePresenter<V>> extends BaseActivity {
    protected  T t;
    @Override
    protected void initPresenter() {
        super.initPresenter();
        t = createPresenter();
        t.attachView((V) this);

    }
    protected  abstract  T createPresenter();

    @Override
    protected void onDestroy() {
        super.onDestroy();
        t.detachView();
    }
}
